<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.9.0">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
  
  
  <title>  如何实现复制Excel内容更新数据 |   XHX Blog </title>

 
  
    <link rel="icon" href="/images/avatar.jpg">
  


  <link rel="stylesheet" href="/nayo.min.css"> 
</head>  
  <body>   
    
      <header class="header-wrapper">

  <nav class="inner">
    <div class="title">
      <a href="/">
        <img class="logo" src="/images/avatar.jpg">
      </a>
    </div>

    <ul class="menu">
      
      
      <li class="item">
        <a class="link" id="menu-home" href="/">
          <i class="iconfont icon-home">
        </i></a>
      </li>
      
      
      
      <li class="item">
        <a class="link" id="menu-archives" href="/archives">
          <i class="iconfont icon-archives">
        </i></a>
      </li>
      
      
      
      <li class="item">
        <a class="link" id="menu-tags" href="/tags">
          <i class="iconfont icon-tags">
        </i></a>
      </li>
      
      
      
      <li class="item">
        <a class="link" id="menu-about" href="/about">
          <i class="iconfont icon-about">
        </i></a>
      </li>
      
      
      
      <li class="item">
        <a class="link" id="menu-search">
          <i class="iconfont icon-search">
        </i></a>
        

        
      
    </li></ul>
  </nav>
</header>

<header class="mobile-header-wrapper">
  <i id="mobile-toggle" class="iconfont icon-menu mobile-toggle"></i>
</header>   

      <div class="container">       
          
          
            <div class="container-inner">  
          

          <article class="post slideDownMin">
  
	
<div class="header">
		<p class="title">	
			如何实现复制Excel内容更新数据
		</p>
		<div class="info">	
			<time>
				May 15, 2020
			</time>

			
			
				<i class="iconfont icon-words"></i>
				<span class="words">6397
				</span>
			
		</div>
</div> 
	

    <script type="text/x-mathjax-config">
        var post = document.getElementsByClassName("post")[0];  
        MathJax.Hub.Config({
            showProcessingMessages: false,
            messageStyle: "none",    
            tex2jax: {
                inlineMath:  [ ["$", "$"] , ["\\(","\\)"]],
                displayMath: [ ["$$","$$"] , ["\\[","\\]"]],
                skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'],
            },
            "HTML-CSS": {            
                showMathMenu: false
            }
        });
        MathJax.Hub.Queue(["Typeset",MathJax.Hub,post]);
    </script>
    <style>.MathJax{outline:0;}</style>

    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.2/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
 

	  <div class="typo post-content ">

		

			
					<h2 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h2><p>&emsp;&emsp;上季度在迭代通用策略的时候，曾经尝试迁移 PHP 版本的策略数据上传功能到 Java 后台，最后结果是配置管理部分的都完成了迁移（技术难度较低），但是相对而言，修改下载下来的 Excel 数据，然后复制内容到文本域里实现上传更新的功能就复杂的多，在上次的迁移中以失败告终，没有顺利迁移过来。</p>
<p>&emsp;&emsp;这个季度需要做的需求”智能调拨“也有类似的技术点：需要实现智能调拨方案的下载数据和修改数据，然后上传覆盖更新，还需要记录更新日志。不一样的业务场景，相似的技术点，不过最大的不同在于：这次的方案全盘由我自己来决策，需要什么字段自己加，需要执行什么操作自己构思；自由发挥的空间很大。因此心中就决心这次一定要把这个功能做好。</p>
<p><strong>策略更新的信息</strong><br><img src="/images/%E7%AD%96%E7%95%A5%E6%9B%B4%E6%96%B0.png" alt="策略更新表"></p>
<a id="more"></a>
<p><strong>智能调拨更新的信息</strong><br><img src="/images/%E6%99%BA%E8%83%BD%E8%B0%83%E6%8B%A8%E6%9B%B4%E6%96%B0.png" alt="智能调拨更新表"></p>
<h2 id="构思"><a href="#构思" class="headerlink" title="构思"></a>构思</h2><p>&emsp;&emsp;在回忆上次开发通用策略的经验中和对本次智能调拨方案的拆解的过程中，我将上传数据更新的难点拆分为如下几个点：</p>
<h3 id="表格数据的校验"><a href="#表格数据的校验" class="headerlink" title="表格数据的校验"></a>表格数据的校验</h3><p>&emsp;&emsp;数据进入后台第一步就是需要对传入的数据进行校验，其实不仅仅是上传更新，所有的接口都应该对入参进行校验，只是该场景下”非结构化数据——String“ 转换成”结构化数据——表格“所需要进行的校验相对更麻烦。我这里对智能调拨方案的数据校验分成2步：</p>
<p>&emsp;&emsp;第一步，表头的验证。验证表格的列数是否和原始数据一致，顺序是否一致。这里从库表中按照指定的排序（一般按照 <code>id</code> 排序，策略字段表有 <code>order</code> 字段，可以用自定义排序顺序）取出期望的列信息，并存入到 <code>ArrayList</code> 这种有序的列表中进行比对。</p>
<p>&emsp;&emsp;第二步，数据行数的验证。智能调拨方案导入需要保证数据行数和原始数据一致，因此这里把原始表中的记录也全数查出按照特定顺序(这里是用的商品 ID 排序)，并和入参逐行对比确认所有的行都是正确的顺序，并且和上一步的表头长度对比，确认每一行都不缺数。通用策略那边不需要保证行数一致，但是需要保证数据列一致，因此这一步也不能省略。</p>
<h3 id="数据项更新或新增的判断"><a href="#数据项更新或新增的判断" class="headerlink" title="数据项更新或新增的判断"></a>数据项更新或新增的判断</h3><p>&emsp;&emsp;数据项是新增还是更新是根据数据库中是否有记录决定的，智能调拨这里是根据原始数量是否等于0确定的，通用策略是通过索引字段是否一致确定的。两者形式不同，但都需要做更新/新增的判断。智能调拨判断的逻辑如下：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">updates.forEach(update -&gt; &#123;</span><br><span class="line">  <span class="keyword">if</span> (update.getNumFrom() == <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="comment">// 从无到有要新增记录</span></span><br><span class="line">    itemService.insertDetailRecord(update, planId);</span><br><span class="line">  &#125; <span class="keyword">else</span> <span class="keyword">if</span> (update.getNumTo() == <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="comment">// 从有到无要删除记录</span></span><br><span class="line">    itemService.deleteDetailRecord(update, planId);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    <span class="comment">// 否则更新记录</span></span><br><span class="line">    itemService.updateDetailRecord(update, planId);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>

<p>&emsp;&emsp;非常简单的实现了新增/更新判断。</p>
<p>&emsp;&emsp;通用策略的新增/更新判断需要根据索引字段确认，目前索引字段是通过取数据手动拼接实现的，后续计划在表中冗余该字段提高性能，同时也实现了对修改索引而不需要清空数据。这里判断新增/更新的逻辑如下：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">updates.foreach(update -&gt; &#123;</span><br><span class="line">  <span class="keyword">if</span>(existIndexes.contains(update.getIndex())) &#123;</span><br><span class="line">    strategyDataDoMapper.updateData(update, existIndexes.get(update.getIndex()), strategyId);</span><br><span class="line">  &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    strategyDataDoMapper.insertData(update, strategyId);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>

<p>&emsp;&emsp;实现新增/更新判断同样也不复杂。</p>
<h3 id="维度值的转换"><a href="#维度值的转换" class="headerlink" title="维度值的转换"></a>维度值的转换</h3><p>&emsp;&emsp;智能调拨方案的维度转换较为有限，仅仅需要仓库维度，场景也仅限于展示表头的仓库信息和日志的仓库信息，使用到维度转换只有一类：<code>XmDimensionUtil.getRemote(&quot;mihome&quot;, mihomeId)</code>。不过通用策略场景的所有字段都是通过配置实现，因此维度转换的场景更多样，维度转换+数据结构转换交织在一起，造成了上一次通用策略的接口迁移无比痛苦，总是转着转着就忘记当前的这个字段到底是名称还是键，还存在循环转换的潜在风险。<br>&emsp;&emsp;这次实现智能调拨的过程将这一部分思路整理清楚了，原则也很简单：信息只拓展不覆盖。用通俗的话说就是：<strong>把 key 和 name 都存起来，就不存在迷惑的可能了</strong>。这一句说起来简单，但是维度信息是用户配置，实践起来可能仍有一些坑需要踩。</p>
<h2 id="实现"><a href="#实现" class="headerlink" title="实现"></a>实现</h2><p>&emsp;&emsp;考虑完所有的坑之后，实现起来就比较顺利了，也比较幸运，用了大约半天（4-6小时）一口气实现了这部分的代码。自我感觉在没有大量注释的情况下可读性还是不错的~这里直接抛出来供大家鞭策指正。</p>
<h3 id="service-代码"><a href="#service-代码" class="headerlink" title="service 代码"></a>service 代码</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> String <span class="title">importTransferPlanDetail</span><span class="params">(Long planId, String data, Long operator)</span> </span>&#123;</span><br><span class="line">  TransferPlanDO plan = transferPlanMapper.selectPlanByPlanId(planId);</span><br><span class="line">  <span class="keyword">if</span> (plan == <span class="keyword">null</span>) &#123;</span><br><span class="line">      <span class="keyword">throw</span> <span class="keyword">new</span> CommonException(ErrorCodeEnum.TRANSFER_PLAN_NOT_EXIST);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">if</span> (plan.getStatus() != TransferConst.PlanStatus.CREATED) &#123;</span><br><span class="line">      <span class="keyword">throw</span> <span class="keyword">new</span> CommonException(ErrorCodeEnum.TRANSFER_PLAN_NOT_EDITABLE);</span><br><span class="line">  &#125;</span><br><span class="line">  TransferPlanDetailBO bo = getTransferPlanDetail(planId);</span><br><span class="line">  StringBuilder err = <span class="keyword">new</span> StringBuilder();</span><br><span class="line">  </span><br><span class="line">  <span class="keyword">try</span> &#123;</span><br><span class="line">      <span class="comment">// 验证数据 + 获取数据的更新信息</span></span><br><span class="line">      List&lt;TransferPlanDetailRecordUpdateBO&gt; updates = getUpdates(data, bo, err);</span><br><span class="line">      <span class="keyword">if</span> (err.length() &gt; <span class="number">0</span>) &#123;</span><br><span class="line">    <span class="keyword">return</span> err.toString();</span><br><span class="line">      &#125;</span><br><span class="line">      <span class="comment">// 更新数据库详情数据</span></span><br><span class="line">      updates.forEach(update -&gt; &#123;</span><br><span class="line">    <span class="keyword">if</span> (update.getNumFrom() == <span class="number">0</span>) &#123;</span><br><span class="line">  <span class="comment">// 从无到有要新增记录</span></span><br><span class="line">  itemService.insertDetailRecord(update, planId);</span><br><span class="line">    &#125; <span class="keyword">else</span> <span class="keyword">if</span> (update.getNumTo() == <span class="number">0</span>) &#123;</span><br><span class="line">  <span class="comment">// 从有到无要删除记录</span></span><br><span class="line">  itemService.deleteDetailRecord(update, planId);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">  <span class="comment">// 否则更新记录</span></span><br><span class="line">  itemService.updateDetailRecord(update, planId);</span><br><span class="line">    &#125;</span><br><span class="line">      &#125;);</span><br><span class="line">      <span class="comment">// 更新调拨方案更新时间</span></span><br><span class="line">      transferPlanMapper.updateTime(planId, System.currentTimeMillis() / <span class="number">1000</span>);</span><br><span class="line">      <span class="comment">// 写入日志</span></span><br><span class="line">      logService.logImport(operator, planId, updates);</span><br><span class="line">  &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line">      err.append(e.getMessage());</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">return</span> err.toString();</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>

<h3 id="update-函数部分"><a href="#update-函数部分" class="headerlink" title="update 函数部分"></a>update 函数部分</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">private</span> List&lt;TransferPlanDetailRecordUpdateBO&gt; <span class="title">getUpdates</span><span class="params">(String data, TransferPlanDetailBO bo, StringBuilder err)</span> </span>&#123;</span><br><span class="line">    String[] rows = data.split(<span class="string">"[\n]+"</span>);</span><br><span class="line">    <span class="keyword">if</span> (rows.length != bo.getDatas().size() + <span class="number">1</span>) &#123;</span><br><span class="line">        <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"数据行数错误！需要"</span> + (bo.getDatas().size() + <span class="number">1</span>) + <span class="string">"行。"</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    String[] headers = rows[<span class="number">0</span>].split(<span class="string">"[\t]+"</span>);</span><br><span class="line">    String[] dataRows = Arrays.copyOfRange(rows, <span class="number">1</span>, rows.length);</span><br><span class="line">    PlanDetailHeaderBO[] existHeaders = bo.getHeaders().toArray(<span class="keyword">new</span> PlanDetailHeaderBO[<span class="number">0</span>]);</span><br><span class="line">    HashMap&lt;String, Object&gt;[] existDataRows = bo.getDatas().toArray(<span class="keyword">new</span> HashMap[<span class="number">0</span>]);</span><br><span class="line">    <span class="keyword">if</span> (existHeaders.length != headers.length) &#123;</span><br><span class="line">        <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"表头列数错误！需要"</span> + existHeaders.length + <span class="string">"列。"</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">// 验证表头</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; existDataRows.length; i++) &#123;</span><br><span class="line">        <span class="keyword">if</span> (!headers[i].equals(existHeaders[i].getTitle())) &#123;</span><br><span class="line">            err.append(<span class="string">"表头缺少["</span> + existHeaders[i].getTitle() + <span class="string">"]\n"</span>);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    List&lt;TransferPlanDetailRecordUpdateBO&gt; result = <span class="keyword">new</span> ArrayList&lt;&gt;();</span><br><span class="line">    <span class="comment">// 验证数据</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; existDataRows.length; i++) &#123;</span><br><span class="line">        String[] cells = dataRows[i].split(<span class="string">"[\t]+"</span>);</span><br><span class="line">        HashMap&lt;String, Object&gt; existRow = existDataRows[i];</span><br><span class="line">        String currentGoodsId = String.valueOf(existRow.get(<span class="string">"goods_id"</span>));</span><br><span class="line">        String currentGoodsName = (String) existRow.get(<span class="string">"goods_name"</span>);</span><br><span class="line">        String currentSku = (String) existRow.get(<span class="string">"sku"</span>);</span><br><span class="line">        <span class="keyword">if</span> (cells.length != existRow.size()) &#123;</span><br><span class="line">            <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"第"</span> + (i + <span class="number">1</span>) + <span class="string">"行数据列数错误！需要"</span> + existRow.size() + <span class="string">"列。\n"</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">boolean</span> goodsId = cells[<span class="number">0</span>].equals(currentGoodsId);</span><br><span class="line">        <span class="keyword">boolean</span> goodsName = cells[<span class="number">1</span>].equals(currentGoodsName);</span><br><span class="line">        <span class="keyword">boolean</span> sku = cells[<span class="number">2</span>].equals(currentSku);</span><br><span class="line">        <span class="keyword">if</span> (!goodsId || !goodsName || !sku) &#123;</span><br><span class="line">            err.append(<span class="string">"第"</span> + (i + <span class="number">1</span>) + <span class="string">"行数据商品信息有误，应为"</span> + currentGoodsName);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">int</span> j = <span class="number">3</span>; j &lt; cells.length; j++) &#123;</span><br><span class="line">            String currentCellInfo = existHeaders[j].getTitle() + <span class="string">"调拨"</span> + currentGoodsName;</span><br><span class="line">            <span class="keyword">try</span> &#123;</span><br><span class="line">                <span class="comment">// 转换数据</span></span><br><span class="line">                Integer preNum = ((Double) existRow.get(existHeaders[j].getDataIndex())).intValue();</span><br><span class="line">                Integer newNum = Integer.parseInt(cells[j]);</span><br><span class="line">                <span class="keyword">if</span> (newNum &lt; <span class="number">0</span>) &#123;</span><br><span class="line">                    err.append(currentCellInfo + <span class="string">"数据有误，请检查。\n"</span>);</span><br><span class="line">                    <span class="keyword">continue</span>;</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="keyword">if</span> (!preNum.equals(newNum)) &#123;</span><br><span class="line">                    String[] mihomePair = existHeaders[j].getDataIndex().split(<span class="string">"-"</span>);</span><br><span class="line">                    String[] mihomeNamepair = existHeaders[j].getTitle().split(<span class="string">"-"</span>);</span><br><span class="line">                    result.add(TransferPlanDetailRecordUpdateBO.builder()</span><br><span class="line">                            .goodsId(currentGoodsId)</span><br><span class="line">                            .goodsName(currentGoodsName)</span><br><span class="line">                            .sku(currentSku)</span><br><span class="line">                            .mihomeFrom(mihomePair[<span class="number">0</span>])</span><br><span class="line">                            .mihomeTo(mihomePair[<span class="number">1</span>])</span><br><span class="line">                            .mihomeFromName(mihomeNamepair[<span class="number">0</span>])</span><br><span class="line">                            .mihomeToName(mihomeNamepair[<span class="number">1</span>])</span><br><span class="line">                            .numFrom(preNum)</span><br><span class="line">                            .numTo(newNum).build());</span><br><span class="line">                &#125;</span><br><span class="line">            &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line">                err.append(currentCellInfo + <span class="string">"数据有误，请检查。\n"</span>);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> result;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>&emsp;&emsp;<code>getUpdates</code>部分的代码一开始其实是准备把验证和读数分开做的<del>先验证格式正确性，取出入参的子集数据<code>int[][]</code>，再进行新建/更新判断，但是做的过程中发现没有必要，已经遍历到具体的数值了，对应的原始数值也正好能读到（已有数据的数据结构是用 HashMap 存储的，用<code>dataRow.get([headerName])</code>就可以得到），就直接去生成对应的变更记录列表了。由于违背了一开始的设计思路，所以可能看起来有点乱，如果你有更优雅的实现方式也可以跟我交流下</del></p>
<h2 id="后续迭代计划"><a href="#后续迭代计划" class="headerlink" title="后续迭代计划"></a>后续迭代计划</h2><p>&emsp;&emsp;这里使用了100行不到的代码实现了对上传数据表格更新数据库的具体操作（当然还有前置读取原始数据的步骤），虽然代码不多，但是还是比较锻炼思维能力，我第二次开发才算比较满意的实现了预期的效果，后续计划将对上次未完成的通用策略的数据导入进行开发，进一步提高对这部分技术点的掌握。</p>
<blockquote>
<p>平凡的业务中也有不平凡的闪光点~</p>
</blockquote>
  	
					
	  </div>     
	  

	<div class="bottom">
  <div class="other">
    <div class="meta">
      

      
      <i class="iconfont icon-tag"></i>
      <a class="tag-link" href="/tags/Java/">Java</a> <a class="tag-link" href="/tags/技术方案/">技术方案</a>
      
    </div>

    <div class="operate">
      
      <span class="text">Share</span>
      <ul class="share">
	   			             
        <li class="iconfont 
		icon-share-qq 
		-mob-share-qq 
		item"></li>		
   	   			             
        <li class="iconfont 
		icon-share-weixin 
		-mob-share-weixin 
		item"></li>		
   	   			             
        <li class="iconfont 
		icon-share-weibo 
		-mob-share-weibo 
		item"></li>		
   	   
</ul>	

<script id="-mob-share" src="https://f1.webshare.mob.com/code/mob-share.js?appkey=21d601593a1de"></script>
      
    </div>
  </div>


  
  <nav class="nav">
    <div class="link">
      
      <a href="/2020/04/30/学以致用/" class="link-wrap">
        <strong class="caption">older</strong>
        
        <span class="title">
          学以致用
        </span>
      </a>
      
    </div>
    <div class="link">
      
    </div>
  </nav>
  
</div> 
	
<div class="comment">

    

    <div id="comment">
    </div>

    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>

    <script src="//unpkg.com/valine@v1.1.8-beta/dist/Valine.min.js"></script>

    <script>
        new Valine({
            el: '#comment',
            notify: false,
            verify: false,
            app_id: 'cFM0eCo0CQ9xmBXmHi1eltol-gzGzoHsz',
            app_key: 'oh9tizsnvV2vNvWgqEvoNtQO',
            path: window.location.pathname,
            avatar: 'mm',
            guest_info: ['nick', 'mail']
        });
    </script>
    
</div>	
</article>

          </div> 
      </div>            
    
        <i id="toTop" class="iconfont icon-backtotop"></i>

  
    <div class="none" id="search">
    <div class="header">
        <input type="text" placeholder="Typing Something here." id="search-input" class="input">
        
        <i id="search-cancel" class="iconfont icon-cancel"></i>
    </div>

    <div id="search-result" class="result"></div>
</div>
     <div class="mobile-menu">      

      
      <img class="mobile-menu-icon" src="/images/avatar.jpg">  
      

         
            

            <a class="mobile-menu-link" href="/">Home
            </a>
            
         
            

            <a class="mobile-menu-link" href="/archives">Archives
            </a>
            
         
            

            <a class="mobile-menu-link" href="/tags">Tags
            </a>
            
         
            

            <a class="mobile-menu-link" href="/about">About
            </a>
            
         
                          

            <a class="mobile-menu-link mobile-menu-search" href="#">Search </a>                 
            
         
      
</div>
        
    



     
    


<footer class="footer">
	<div class="inner">
		<div class="copyright">
			&copy;
			
			2019 -
			
			2020
			Lemon

			<br>
			By <a href="https://hexo.io" target="_blank">Hexo</a> Theme <a href="https://github.com/Lemonreds/hexo-theme-Nayo" target="_blank">Nayo</a>
		</div>
	</div>
</footer>   

    <script src="/nayo.bundle.js"></script>           
  </body>        
</html>